﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Threading.Tasks;

namespace Nb.Common.Attributes
{
    [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
    public class NbAssemblyAttribute : Attribute
    {
        public NbAssemblyAttribute(string name)
        {
            Name = name;
        }
        public string Name { get; set; }
    }
    /// <summary>
    /// 软件协议模块标签，表示协议的元信息，作用在Assembly上
    /// area/controller/action
    /// eg: Space/*/*;Live/*/*;
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = true)]
    public class ModuleAttribute : Attribute
    {
        /// <summary>
        /// 模块的名称或ID
        /// </summary>
        public string ModuleName { get; set; }
        /// <summary>
        /// 模块的显示名称
        /// </summary>
        public string ModuleCaption { get; set; }
        /// <summary>
        /// 模块的收费控制点，可以是一个List，也可以一个用';'或','分割的字符串 //
        /// 其中每一个体格式为
        /// Area/Controller/Action
        /// 或者"Space/{controller}/{action};Portal/{controller}/{action};Space/{owner}/{controller}/{action};"
        /// </summary>
        public string ControlPoints { get; set; }
    }

    [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
    public class NhibernateMapAttribute : Attribute
    {
    }

    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
    public class HasMetasInMethodAttribute : Attribute
    {
        public HasMetasInMethodAttribute()
        {
            ContainMethodMeta = true;
        }

        public bool ContainMethodMeta { get; set; }
    }
}
